<?php
namespace Home\Controller;
use Think\Controller;
class PhonesController extends Controller{
  public function phonelist(){

    

$phonemodel=M('phone');

    $phones=$phonemodel->order('id asc')->select();
    //调用试图层显示数据
      $this->phones=$phones;
       $this->display();

//echo $lost->getLastSQL();//本方法用于显示该表最后操作的SQL语句
//var_dump($this->findlist);
}
 public function detailphone($id){
        //调用模型层获取数据
       $phonemodel=M('phone');
       $phones=$phonemodel->select($id); 
       $this->phones=$phones;
       $this->display();
    }

    
 
}